<template>
	<view class="page">
		<fu-custom :isBack="true" :isBottom="true" class="bg-white">
			<block slot="content">联系我们</block>
		</fu-custom>
		<fu-loading v-if="isShowLoading"></fu-loading>
		<block v-else>
			<image style="display:block; width: 334rpx;height: 334rpx; margin: 0 auto;margin-top:121rpx;"
				src="https://localelife.chunchuangkeji.cn/h5img/images/lxkf01.png" mode=""></image>
			<view style="display: flex;justify-content: space-around;" class="">
				<view style="margin-top:56rpx; display: flex;align-items: center;" class="">
					<view
						style="margin-left: 16rpx; font-size: 40rpx;font-family: PingFang SC;font-weight: bold;color: #333333;">
						{{service_mobileData}}
					</view>
				</view>
			</view>
			<view
				style="text-align: center;margin-top:16rpx;font-size: 26rpx;font-family: PingFang SC;font-weight: 400;color: #999999;">
				客服在线时间 {{service_timeData}}
			</view>
			<view class="btn" @click="makePhoneCall(service_mobileData)">拨打电话</view>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				service_timeData: '',
				service_mobileData: '',
				isShowLoading: false
			}
		},
		onLoad() {
			this.getBase()
		},
		methods: {
			makePhoneCall(phone) {
				uni.makePhoneCall({
					phoneNumber: phone //仅为示例
				});

			},
			getBase() {
				this.isShowLoading = true;
				this.$api.post(global.apiUrls.getBase).then(res => {
					this.isShowLoading = false;
					if (res.data.code == 1) {
						this.service_mobileData = res.data.data.tel;
						this.service_timeData = res.data.data.time
					}
				}).catch(err => {
					this.isShowLoading = false;
				});
			}

		}


	}
</script>

<style scoped lang="scss">
	.page {
		overflow: hidden;
		min-height: 100vh;
		background-color: #FFFFFF;

	}

	.btn {
		width: 600rpx;
		height: 88rpx;
		text-align: center;
		line-height: 88rpx;
		background-color: #FF6F27;
		border-radius: 44rpx;
		margin: 93rpx auto 0;
		font-size: 32rpx;
		color: #fff;
	}
</style>
